package com.jcb.countfrench.view;

import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;

import com.jcb.countfrench.MainActivity;
import com.jcb.countfrench.R;
import com.jcb.countfrench.model.User;
import com.jcb.countfrench.presenter.CountPresenter;

public class InitialView extends LinearLayout{
	Button[] buttonChoixLevel = new Button[3] ;
	Button btnQuizz ;
	CountPresenter presenter ;
	final MainActivity mainActivity ;
	
	public InitialView(Context context, final MainActivity mainActivity, User user, CountPresenter presenter) {
		super(context);
		this.mainActivity = mainActivity ;
		LayoutInflater layoutInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		layoutInflater.inflate(R.layout.initial_view,this);		
		buttonChoixLevel[0]  = (Button) findViewById(R.id.btnlearnLevel1);

		buttonChoixLevel[0].setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View arg0) {
				Log.i("WXW", "clickmmmm" + Thread.currentThread().getName());
				mainActivity.displayLearnView();
			}			
		}
		) ;
		
		btnQuizz = (Button) findViewById(R.id.btnQuizz);
		btnQuizz.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View arg0) {
				Log.i("WXW", "clic btn quizz" + Thread.currentThread().getName());
				mainActivity.displayQuizzChoiceView();
			}			
		}
		) ;
		
	}


	
}


